<?php
declare (strict_types=1);

namespace app\model;

use app\model\user\User;
use think\Model;

/**
 * @mixin \think\Model
 */
class Chat extends Model
{
    protected $autoWriteTimestamp = true;
    protected $createTime = 'c_time';
    protected $updateTime = 'u_time';
    /**
     * User关联模型
     * @return \think\model\relation\HasOne
     * @author dgc<453342213@qq.com>
     * createTime:2020/8/24 14:14
     */
    public function userInfo()
    {
        return $this->hasOne(User::class, 'id', 'user_id');
    }
}
